package com.interview.domain;

import lombok.Data;

import java.math.BigDecimal;

@Data
public class OrderItem {
    private String title;
    private Double price;
    private Double quantity;
    private Double discount;
    private BigDecimal total;

    @Override
    public String toString() {
        return "标题："+title+",单价(元/每斤)："+price+",数量(斤)："+quantity+((discount<1.0)?",折扣："+discount*10+"折":"")+",总价:"+total;
    }
}
